#include "MarsPrecompile.h"

#include "MarsTexture.h"
#include "MarsRenderer.h"

using namespace Graphics;

bool Texture::LoadTexture()
{
	HRESULT	d3dResult = D3DX11CreateShaderResourceViewFromFileA( 
		Renderer::Instance().GetDevice(),
		m_strTexFileName.c_str(), 
		0, 
		0, 
		&m_pTextureSRV, 
		0 );

	if ( FAILED( d3dResult ) )
	{
		return false;
	}

	return true;
}

void Texture::UnloadTexture()
{
	SAFE_RELEASE( m_pTextureSRV );
}
